home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15317 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.2 KB  |  43 lines

  1. Path: news.halcyon.com!usenet
  2. From: Glen Parker <glenebob@halcyon.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Need help making a DLL
  5. Date: Thu, 04 Apr 1996 11:43:06 -0800
  6. Organization: Computer Systems Contracting
  7. Message-ID: <3164264A.636D@halcyon.com>
  8. References: <4jnp0s$d7p@newsbf02.news.aol.com>
  9. NNTP-Posting-Host: blv-pm2-ip29.halcyon.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.01 (WinNT; I)
  14.  
  15. Err Dogg wrote:
  16. > I need a little hand making a DLL.  I have some C++ functions that I want
  17. > to incorporate into VB, but I'm having trouble making the DLL.  I have
  18. > Borland C++ 4.0.  I thought all I needed to do was somthign like
  19. > int _export far pascal function (int arg1)
  20. > {
  21. >   function
  22. > }
  23. > I thought the compiler would then know I wanted a DLL, but I select
  24. > project, make, and it trys to build an EXE.  Thanks for your time.
  25.  
  26. You need to change the target to 'Windows DLL' in 
  27. the terget expert.  Also, you need to export the 
  28. function(s) as C, not C++ classes by using the 
  29. 'extern "C"' key thingy, like this(in the header 
  30. file):
  31.  
  32. extern "C" {
  33.  
  34.   int _export far pascal function (int arg1);
  35.  
  36. }
  37.  
  38. Glen Parker
  39.  
  40.